**************************************************************************************************************************
*Replication file for the paper "Support for deliberative mini-publics among the losers of representative democracy" published in BJPS by Jean-Benoit Pilet, Camille Bedock, David Talukder and Sacha Rangoni


*Labelling the variables used in the paper

*support for deliberative democracy
label define supportddgen2_label 0 "Very Bad Idea" 1 "1" 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" 10 "Very Good Idea"
label values supportddgen2 supportddgen2_label
*satisfaction with democracy
label define satisdemo_label 0 "Not satisfied at all" 1 "1" 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" 10 "Extremely satisfied"
label values satisdemo satisdemo_label

*Political efficacy
label define polcomplicated_label 4 "Strongly agree" 3 "Somewhat agree" 2 "Somewhat disagree" 1 "Strongly disagree"
label values polcomplicated polcomplicated_label
*Country
rename country Country
label define country_label 1 "Austria" 2 "Belgium (FR)" 3 "Belgium (NL)" 4 "Denmark" 5 "Finland" 6 "France" 7 "Germany" 8 "Greece" 9 "Italy" 10 "Ireland" 11 "Netherlands" 12 "Norway" 13 "Portugal" 14 "Spain" 15 "Sweden" 16 "UK"
label values Country country_label
* winner-loser gap
label define replastelection_label 0"Abstained" 1"Voted for a permanent opponent" 2"Voted for a party currently in opposition" 3"voted for a government party"
label values replastelection replastelection_label
*Age
rename age Age
*gender
label define women_label 0 "Man" 1 "Woman"
label values gender women_label
*education
label define education3cat_label 1 "Lower secondary education or less" 2 "Higher secondary education" 3 "Tertiary education"
label values education3cat education3cat_label
*perception of income
label define perceptionincome_label 1 "Living comfortably on present income" 2 "Coping on present income" 3 "Finding it difficult on present income" 4 "Finding it very difficult on present income"
label values perceptionincome perceptionincome_label

*supportddgen3cat
label define supportddgen3cat_label 1 "Oppose" 2 "Neutral" 3 "Favorable"
label values supportddgen3cat supportddgen3cat_label

*abstained underrepresented (robustness check (test R1 Full loser (Congruence + Abstention), not in the paper) 

label define abstained_underrepresented_label 0 "Respondent who did not abstain and/or are not underrepresented" 1 "Respondents who abstained and are underrepresented"
label values abstained_underrepresented abstained_underrepresented_label



*********************************************************************************
** ANALYSES 

* Figure 1 - Distribution of the level of support for deliberative mini-publics to replace elected politicians
* histogram
histogram supportddgen2, discrete fcolor(gs12) lcolor(gs8) ytitle(`"percentage"') xtitle(`"Support for citizens assemblies"')

*Restricted maximum likelihood estimation.

*Model0
mixed supportddgen2 satisdemo i.polcomplicated gender Age || Country:, reml dfmethod(satterthwaite)
*Model 1
mixed supportddgen2 ib3.replastelection satisdemo i.polcomplicated gender Age || Country:, reml dfmethod(satterthwaite)
* Model 2 : Congruence government G/D. 
mixed supportddgen2 cong_gov_lr satisdemo i.polcomplicated gender Age || Country:, reml dfmethod(satterthwaite)
* figure 2: Predicted support for randomly selected citizens replacing elected politicians according to the level of ideological incongruence with the government
margins, at(cong_gov_lr=(0(0.05)0.6))
marginsplot, scheme (plottig) xtitle(Ideological incongruence with government)
* Model 3 : Congruence parliament G/D. 
mixed supportddgen2 cong_parl_lr satisdemo i.polcomplicated gender Age || Country:, reml dfmethod(satterthwaite)
*Model 4 : Descriptive representation
mixed supportddgen2 ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated Age || Country:, reml dfmethod(satterthwaite)
*Modèle 5 : Full model model with government G/D
mixed supportddgen2 ib3.replastelection cong_gov_lr ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated  Age || Country:, reml dfmethod(satterthwaite)
outreg2 using RegressionEPIS_V2BJPS.doc, alpha(0.001, 0.01, 0.05) append ctitle(Model 5)
*Modèle 6 : Full model with parlement G/D 
mixed supportddgen2 ib3.replastelection cong_parl_lr ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated  Age || Country:, reml dfmethod(satterthwaite)


********************************************************************************
*ROBUSTNESS CHECKS AND SUPPLEMENTARY MATERIALS
***********


***** Appendix 1 Descriptive statistics

histogram supportddgen2, discrete fcolor(gs12) lcolor(gs8) ytitle(`"percentage"') xtitle(`"Support for citizens assemblies"') by(Country)
tabstat satisdemo, s(mean sd n)
tab replastelection
tab education3cat
tab perceptionincome
tab polcomplicated


***** Appendix 2 Trichotomisation of the dependent variable
*NB:Trichotomisation of the dependent variable. Oppose = 0, 1, 2, 3 // Neutral = 4, 5, 6 // Favorable : 7, 8, 9, 10
*** Multinomial logit regression with trichotomized DV
*Model 0
mlogit supportddgen3cat satisdemo i.polcomplicated gender Age, vce(robust) 
*Model 1
mlogit supportddgen3cat  ib3.replastelection satisdemo i.polcomplicated gender Age, vce(robust) 
* Model 2 : Congruence government G/D. 
mlogit supportddgen3cat  cong_gov_lr satisdemo i.polcomplicated gender Age, vce(robust) 
* Model 3 : Congruence parliament G/D. 
mlogit supportddgen3cat cong_parl_lr satisdemo i.polcomplicated gender Age, vce(robust)
*Model 4 : Représentation desriptive 
mlogit supportddgen3cat  ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated Age, vce(robust) 
*Modèle 5 : Full model model with government G/D
mlogit supportddgen3cat  ib3.replastelection cong_gov_lr ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated  Age, vce(robust) 
*Modèle 6 : Full model with parlement G/D 
mlogit supportddgen3cat ib3.replastelection cong_parl_lr ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated  Age, vce(robust) 


*Appendix 3
**** Descriptive statistics about the link between satisfaction with democracy and political representation

oneway satisdemo replastelection, tabulate
*** Least satisfied with democracy = permanent opponents. More satisfied = those who voted for a party in government 
oneway satisdemo gender, tabulate
oneway satisdemo education3cat, tabulate
oneway satisdemo perceptionincome, tabulate

***SWD / Congruence
pwcorr satisdemo cong_parl_lr, sig
pwcorr satisdemo cong_gov_lr, sig
*** No significant correlation in both case



*** Appendix 4 : Path analysis using Structural Equation Modelling 


*** Model A (sets of regressions using SEM with Country clustered robust standard error)
sem (Age -> supportddgen2, ) (satisdemo -> supportddgen2, ) (polcomplicated -> supportddgen2, ), group() ginvariant(none) vce(cluster Country) nocapslatent
estat teffects
estat gof, stats(all)

*Model B path analysis (direct and indirect effect with Country clustered robust standard error) 
sem (Age -> supportddgen2, ) (education3cat -> satisdemo, ) (education3cat -> supportddgen2, ) (perceptionincome -> satisdemo, ) (perceptionincome -> supportddgen2, ) (satisdemo -> supportddgen2, ) (gender -> satisdemo, ) (gender -> supportddgen2, ) (polcomplicated -> supportddgen2, ) (cong_gov_lr -> satisdemo, ) (cong_gov_lr -> supportddgen2, ) (replastelection -> satisdemo, ) (replastelection -> supportddgen2, ), group() ginvariant(none) vce(cluster Country) nocapslatent
estat teffects
estat gof, stats(all)


* Robustness check (not in the paper) alternative path analysis with binary replastelection variable 

recode replastelection 0/2=1 3=0, gen (voteop)

sem (Age -> supportddgen2, ) (education3cat -> satisdemo, ) (education3cat -> supportddgen2, ) (perceptionincome -> satisdemo, ) (perceptionincome -> supportddgen2, ) (satisdemo -> supportddgen2, ) (gender -> satisdemo, ) (gender -> supportddgen2, ) (polcomplicated -> supportddgen2, ) (cong_gov_lr -> satisdemo, ) (cong_gov_lr -> supportddgen2, ) (voteop -> satisdemo, ) (voteop -> supportddgen2, ), vce(cluster Country) nocapslatent

estat teffects
estat gof, stats(all)


***** Robustness check test for Reviewer 1 (not in the paper) Full loser (Congruence + Abstention)

mixed supportddgen2 satisdemo i.polcomplicated gender Age || Country:, reml dfmethod(satterthwaite)
*Model 1
mixed supportddgen2 abstained_underrepresented satisdemo i.polcomplicated gender Age || Country:, reml dfmethod(satterthwaite)
* Model 2 : Congruence government G/D. 
mixed supportddgen2 cong_gov_lr satisdemo i.polcomplicated gender Age if cong_gov_lr>.3 || Country:, reml dfmethod(satterthwaite)
* Model 3 : Congruence parliament G/D. 
mixed supportddgen2 cong_parl_lr satisdemo i.polcomplicated gender Age if cong_parl_lr>.3|| Country:, reml dfmethod(satterthwaite)
*Model 4 : Représentation desriptive 
mixed supportddgen2 ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated Age || Country:, reml dfmethod(satterthwaite)
*Modèle 5 : Full model model with government G/D
mixed supportddgen2 abstained_underrepresented ib3.education3cat i.perceptionincome gender satisdemo i.polcomplicated  Age || Country:, reml dfmethod(satterthwaite)



